{% extends "base.html" %}
{% block header %}分配用户{% endblock %}
{% block content %}
<div class="card shadow-sm rounded p-4 mb-4">
    <h4 class="mb-3">分配用户到卡</h4>
    <form method="post">
        {% csrf_token %}
        <div class="mb-3">
            <label for="user_id" class="form-label">选择用户</label>
            <select class="form-select" id="user_id" name="user_id" required>
                {% for user in users %}
                <option value="{{ user.id }}">{{ user.username }}</option>
                {% endfor %}
            </select>
        </div>
        <button type="submit" class="btn btn-success">分配</button>
        <a href="/cards/" class="btn btn-secondary ms-2">取消</a>
    </form>
</div>
{% endblock %}
